<template>
	<view class="selectiveId">
		<common-navbar title="选择身份"></common-navbar>
		<view>
			<view class="selectiveId_message">
				<view class="selectiveId_font">我是</view>
				<view class="selectiveId_font_mg">请选择您的身份</view>
			</view>
		</view>

		<view class="selectiveId_card" @click="toAuthent(2)">
			<view>
				<view class="selectiveId_font">企业</view>
				<view class="selectiveId_font_mg">提供专业的法律服务</view>
			</view>

			<image :src="require('../assets/image/enterprise.png')" class="selectiveId_img"></image>
		</view>

		<view class="selectiveId_card" @click="toAuthent(3)">
			<view>
				<view class="selectiveId_font">律师</view>
				<view class="selectiveId_font_mg">海量客户资源</view>
			</view>

			<image :src="require('../assets/image/lawyer.png')" class="selectiveId_img"></image>
		</view>

		<view class="selectiveId_card" @click="toAuthent(1)">
			<view>
				<view class="selectiveId_font">个人</view>
				<view class="selectiveId_font_mg">便捷的法律咨询</view>
			</view>

			<image :src="require('../assets/image/user.png')" class="selectiveId_img"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			async toAuthent(type) {
				await this.$u.post(this.$restUrl.selectCustomerIdentity, {
					customer_type: type
				})
				await this.updateUserInfo();
				console.log('22222222222222222222')
				this.$u.route('/pages/authentication/authentication');
			},
		}
	}
</script>

<style scoped>
	@import "./selectIdentity.scss";
</style>
